<?php
  class Core_Downloads{
  	public static function setHeaderArchive($strDocType = ''){
  	  $strType = '';
  	   
  		if(isset($strDocType) && !empty($strDocType)){
  	  	'application/vnd.ms-excel';
  	  	switch($strDocType){
  	  		case 'doc':
  	  			$strType = 'application/msword';
  	  		break;	
  	  		
  	  		case 'xls':
  	  			$strType = 'application/vnd.ms-excel';
  	  		break;
  	  		
  	  		case 'zip':
            $strType = 'application/zip';
          break;
          
          case 'pdf':
            $strType = 'application/pdf';
          break;
          
  	  		case 'jpeg':
  	  			$strType = 'image/jpeg';
  	  		break;
  	  			
  	  		case 'png':
  	  			$strType = 'image/png';
  	  		break;

          case 'xml':
            $strType = 'text/xml';
          break;
          
          case 'txt':
            $strType = 'text/plain';
          break;
  	  	}
  	  	
  	  	header("Content-type: " . $strType . "");
        
  	  }
  	}
  }